import React from 'react';
import { useNavigate } from 'react-router-dom';
import { Button } from '@weubi/ui';
import { HomeIcon } from '@heroicons/react/24/outline';

const NotFoundPage: React.FC = () => {
  const navigate = useNavigate();

  return (
    <div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
      <div className="max-w-md w-full text-center">
        <div className="mb-8">
          <h1 className="text-9xl font-bold text-gray-300">404</h1>
          <h2 className="text-2xl font-bold text-gray-900 mb-2">页面未找到</h2>
          <p className="text-gray-600 mb-8">
            抱歉，您访问的页面不存在或已被移动。
          </p>
        </div>
        
        <div className="space-y-4">
          <Button
            onClick={() => navigate('/dashboard')}
            className="flex items-center justify-center gap-2 w-full"
          >
            <HomeIcon className="h-5 w-5" />
            返回首页
          </Button>
          
          <Button
            variant="outline"
            onClick={() => navigate(-1)}
            className="w-full"
          >
            返回上一页
          </Button>
        </div>
        
        <div className="mt-8 text-sm text-gray-500">
          <p>如果您认为这是一个错误，请联系系统管理员。</p>
        </div>
      </div>
    </div>
  );
};

export default NotFoundPage;
